package com.vf.admin.utils;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
* 验证特殊字符工具类
* @Param:
* @return:
* @Author: zhouyunyi
* @Date: 2021/07/21
*/
public class ExpressionFilter {


    /**
     * 表情过滤
     *
     */
    private static final Pattern CHECK_EMOJI =
            Pattern.compile("[\ud83c\udc00-\ud83c\udfff]|[\ud83d\udc00-\ud83d\udfff]|[\u2600-\u27ff]", Pattern.UNICODE_CASE | Pattern.CASE_INSENSITIVE);


    public static boolean expressionJudgment(String emjo){
        Matcher emojiTitle = CHECK_EMOJI.matcher(emjo);
        return emojiTitle.find();
    }

    public static void main(String[] args) {
         String aaa="http://www.baidomc.jpg,http://www.baidomc.jpg,";
         List<Object> list=new ArrayList<>();
        String[] arr  = aaa.split(",");
        for(int i=0;i<arr.length;i++){
            arr[i]=arr[i]+"?c";
        }
        //移入数组
        list.add(Arrays.asList(arr));
        for (Object o : list) {
            System.out.println(o);
        }
    }
}
